<template>
	<view class="content position-fixed z-index-99" :style="{'paddingTop':$store.state.statusBarHeight+'px','top':'0'}">
		<view class="title">
			<view class="pl-2" @click="goBack"><text class="iconfont icon-31fanhui1 font30"></text></view>
			<text>{{title}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"TitleBar",
		props: {
			title: {
				type: String,
				default: "标题"
			}
		},
		data() {
			return {
				goBack() {
					uni.navigateBack({
						delta: 1
					});
				}
			};
		}
	}
</script>

<style scoped>
.content {
	width: 100%;
	background-color: #fff !important;
}
.content .title {
	display: flex;
	align-items: center;
	height: 80rpx;
	padding-right: 47rpx;
	border-bottom: 1px solid rgba(204, 204, 204, .2);
}
.content .title text {
	flex: 1;
	font-size: 32rpx;
	text-align: center;
	font-weight: normal;
}
.z-index-99 {
	z-index: 99;
}
</style>